import request from '@/utils/request'

// 查询alarm列表
export function listAlarms(query) {
  return request({
    url: '/system/alarms/list',
    method: 'get',
    params: query
  })
}

// 查询alarm详细
export function getAlarms(alarmId) {
  return request({
    url: '/system/alarms/' + alarmId,
    method: 'get'
  })
}

// 新增alarm
export function addAlarms(data) {
  return request({
    url: '/system/alarms',
    method: 'post',
    data: data
  })
}

// 修改alarm
export function updateAlarms(data) {
  return request({
    url: '/system/alarms',
    method: 'put',
    data: data
  })
}

// 删除alarm
export function delAlarms(alarmId) {
  return request({
    url: '/system/alarms/' + alarmId,
    method: 'delete'
  })
}
